using UnityEngine;
using System.Collections;

public class hitSensor : MonoBehaviour {

	public static int isHit = 0;
	private int health = 0;
	private Transform parent;
	
	void Start ()
	{
		health = 100;
		parent = transform.parent;
	}
	
	void OnTriggerEnter  (Collider other) 
	{
		if (other.CompareTag("bala"))
		{
			statsManager pFunction = parent.GetComponent<statsManager>();
			pFunction.changeHealth(5);
		}
	}
	
	
	
}
